#ifndef GROUP_H
#define GROUP_H

#include "groupuser.hpp"

#include <string>
#include <vector>

// AllGroup 表的ORM类
class Group
{
public:
    Group(int id = -1, std::string name = "", std::string desc = "")
    {
        this->id = id;
        this->name = name;
        this->desc = desc;
    }

    void setId(int id) { this->id = id; }
    void setName(std::string name) { this->name = name; }
    void setDesc(std::string desc) { this->desc = desc; }
    void setGroupUser(GroupUser groupUser) { users.push_back(groupUser); }

    int getId() { return this->id; }
    std::string getName() { return this->name; }
    std::string getDesc() { return this->desc; }
    std::vector<GroupUser> getUsers() {return this->users; }  // 返回群成员vector

private:
    int id;
    std::string name; // 组名
    std::string desc; // 组功能描述
    std::vector<GroupUser> users;  // 组成员
};

#endif